#pragma once
#include <string>

class TCPClient
{
public:
    int socketfd;
    std::string name;
    std::string ip;
    bool authed;
};

// 定义一个 ClientManager 类来管理客户端
class ClientManager
{
public:
    ClientManager() = default;
    ~ClientManager() = default;

    void addClient(int fd, TCPClient *client);
    void removeClient(int fd);
    void broadcast(const std::string &message);
    bool authClient(int fd);
};

extern ClientManager g_client_manager;
